package br.ufpb.di.knowledgetv.classificador;

import java.io.IOException;
import java.io.Reader;

import weka.core.Instances;

public class CriadorDeInstancias {
	
	private static Instances instances;
	
	private static void createInstances(Reader reader) {		
		try {
			instances = new Instances( reader );
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		instances.setClassIndex( 6 );
	}
	
	public static Instances getInstances(Reader reader){
		if( instances == null )
			createInstances(reader);
		return instances;
	}

}
